package com.smart;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.CheckBox;

import com.smart.domain.Task;
import com.smart.service.TaskService;
import com.smart.service.TaskServiceImpl;

public class SmartTaskActivity extends Activity implements OnClickListener {
	private List<Task>tasks;
	private TaskService service;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    	super.onCreate(savedInstanceState);
    	setContentView(R.layout.main);

    	service= new TaskServiceImpl();    	
    	tasks = service.getTasks();
        
        for (Task t : tasks){
        	
        }
        final CheckBox checkBox = (CheckBox) findViewById(R.id.checkBox1);
        checkBox.setOnClickListener(this);
        
        if (checkBox.isChecked()) {
            checkBox.setChecked(false);
        }
    }

	public void onClick(View v) {		
		switch  (v.getId())  {
			case  R.id.checkBox1:
//				Intent  i  =  new  Intent(this,  About.class);
//				startActivity(i);
				break;
				//  More  buttons  go  here  (if  any)  ...
		}
	}
}